#define GPH2_CON	(*(volatile unsigned long *)0xE0200C40)
#define GPH2_DAT	(*(volatile unsigned long *)0xE0200C44)
#define GPH2_PUD        (*(volatile unsigned long *)0xE0200C48)

void led_init()
{ 
   	GPH2_CON = (GPH2_CON & ~0x0000ffff) | 0x00001111; //设置高4为管脚为输出方式
    	GPH2_PUD=(0x55<<16)&GPH2_PUD;//设置为下拉方式
	GPH2_DAT=0xf;
}

void led_on(int num)
{
	GPH2_DAT &= ~( 1<< num);            
}
void led_off(int num)
{
	GPH2_DAT |= ( 1<< num);
}
